/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package javalens.util;

/**
 *
 * @author Pierre
 */
public class ComplexNumber {

    public double real;
    public double imaginary;

    public ComplexNumber(double real, double imaginary) {
        this.real = real;
        this.imaginary = imaginary;
    }

    public static ComplexNumber[] complexArray(double[] realPart, double[] imagPart) {
        assert (realPart.length == imagPart.length);
        ComplexNumber[] ret = new ComplexNumber[realPart.length];
        for (int i = 0; i < realPart.length; ++i) {
            ret[i] = new ComplexNumber(realPart[i], imagPart[i]);
        }
        return ret;
    }
}
